<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">上级分类</label>
        <div class="layui-input-block">
            <select name='ac_parent_id' class='layui-select full-width'>
                <option value="">请选择分类</option>
                {foreach $menus as $menu}

                {eq name='menu.ac_id' value='$vo.ac_parent_id|default=0'}
                <option selected  value='{$menu.ac_id}'>{$menu.spl}{$menu.ac_name}</option>
                {else/}
                <option  value='{$menu.ac_id}'>{$menu.spl}{$menu.ac_name}</option>
                {/eq}

                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-block">
            <input type="text" name="ac_name" value='{$vo.ac_name|default=""}' required="required" title="请输入分类名称" placeholder="请输入分类名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">分类标识码</label>
        <div class="layui-input-block">
            <input type="text" name="ac_code" value='{$vo.ac_code|default=""}' required="required" title="请输入分类标识码" placeholder="请输入分类标识码" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="ac_sort" value='{$vo.ac_sort|default="0"}' title="排序" placeholder="排序" class="layui-input">
        </div>
    </div>

    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {if isset($vo['ac_id'])}<input type='hidden' value='{$vo.ac_id}' name='ac_id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>

<script>window.form.render();</script>